package com.ssh.entity;

import com.common.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 文 件 名 称：User.
 * 文 件 说 明：用户表登录表
 * 创   建   人：zpen.
 * 创 建 时 间：2018/3/21 11:18.
 */
@Entity
@Table(name = "user")
public class User extends BaseEntity {

    private String username;


    private String password;


    private Long userType;


    private Date createTime;


    private Date changeTime;


    private Long conId;

    private Long mecId;

    private Long admId;

    private int state;

    public User(String username, String password, Long userType, Date createTime, Date changeTime, Long conId, Long mecId, Long admId, int state) {
        this.username = username;
        this.password = password;
        this.userType = userType;
        this.createTime = createTime;
        this.changeTime = changeTime;
        this.conId = conId;
        this.mecId = mecId;
        this.admId = admId;
        this.state = state;
    }

    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "user_type")
    public Long getUserType() {
        return userType;
    }

    public void setUserType(Long userType) {
        this.userType = userType;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "change_time")
    public Date getChangeTime() {
        return changeTime;
    }

    public void setChangeTime(Date changeTime) {
        this.changeTime = changeTime;
    }

    @Column(name = "con_id")
    public Long getConId() {
        return conId;
    }

    public void setConId(Long conId) {
        this.conId = conId;
    }

    @Column(name = "mec_id")
    public Long getMecId() {
        return mecId;
    }

    public void setMecId(Long mecId) {
        this.mecId = mecId;
    }

    @Column(name = "adm_id")
    public Long getAdmId() {
        return admId;
    }

    public void setAdmId(Long admId) {
        this.admId = admId;
    }

    @Column(name = "state")
    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public User() {

    }
}
